package com.wondertek.poms.dao.repo;

import com.wondertek.poms.dao.po.ChannelPackage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IChannelPackageDao extends JpaRepository<ChannelPackage, Long> {

    void deleteById(Long id);

    @Query(value = "select NAME from CHANNEL_PACKAGE", nativeQuery = true)
    List<String> getAllPackageNames();

    List<ChannelPackage> findAllByIsPublish(Integer isPublish);
}
